package com.study.mybatisplus.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;

/**
 * <p>
 * 用户金币收支记录
 * </p>
 *
 * @author flwu
 * @since 2020-03-20
 */
@TableName("tbl_user_coin_log")
public class UserCoinLog implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 用户余额快照
     */
    private Long userCoin;

    /**
     * 金币数量
     */
    private Long coin;

    /**
     * 类型，1：支出；2：收入
     */
    private Boolean type;

    /**
     * 标题
     */
    private String title;

    /**
     * 订单ID
     */
    private String orderNumber;

    /**
     * 场景
     */
    private String scene;

    /**
     * 操作人
     */
    private String operator;

    /**
     * 备注/理由
     */
    private String remark;

    /**
     * 最后更新时间
     */
    private LocalDateTime updateDatetime;

    /**
     * 创建时间
     */
    private LocalDateTime createDatetime;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }
    public Long getUserCoin() {
        return userCoin;
    }

    public void setUserCoin(Long userCoin) {
        this.userCoin = userCoin;
    }
    public Long getCoin() {
        return coin;
    }

    public void setCoin(Long coin) {
        this.coin = coin;
    }
    public Boolean getType() {
        return type;
    }

    public void setType(Boolean type) {
        this.type = type;
    }
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }
    public String getOrderNumber() {
        return orderNumber;
    }

    public void setOrderNumber(String orderNumber) {
        this.orderNumber = orderNumber;
    }
    public String getScene() {
        return scene;
    }

    public void setScene(String scene) {
        this.scene = scene;
    }
    public String getOperator() {
        return operator;
    }

    public void setOperator(String operator) {
        this.operator = operator;
    }
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
    public LocalDateTime getUpdateDatetime() {
        return updateDatetime;
    }

    public void setUpdateDatetime(LocalDateTime updateDatetime) {
        this.updateDatetime = updateDatetime;
    }
    public LocalDateTime getCreateDatetime() {
        return createDatetime;
    }

    public void setCreateDatetime(LocalDateTime createDatetime) {
        this.createDatetime = createDatetime;
    }

    @Override
    public String toString() {
        return "UserCoinLog{" +
            "id=" + id +
            ", userId=" + userId +
            ", userCoin=" + userCoin +
            ", coin=" + coin +
            ", type=" + type +
            ", title=" + title +
            ", orderNumber=" + orderNumber +
            ", scene=" + scene +
            ", operator=" + operator +
            ", remark=" + remark +
            ", updateDatetime=" + updateDatetime +
            ", createDatetime=" + createDatetime +
        "}";
    }
}
